// @Bind #view.onReady
!function(self, arg, dsCondition) {
	dsCondition.insert();
}

// @Bind #deptTree.onDataRowClick
!function(self, arg) {
	var dropDown = dorado.widget.DropDown.findDropDown(self);

	var node = self.get("currentNode");

	var curEntity = self.get("currentEntity");

	if (curEntity.dataType.get("name") == "dtEmployee") {

		// invio.set("warehouseUid", warehouseId);
		var employeeUid = node.get("data").get("employeeUid")

		dropDown.close();

	}
}

//@Bind #dtInvIO.onCurrentChange
!function(self, arg) {
	var dsInvIO = view.id("dsInvIO");
	var invIO = dsInvIO.getData("#");
	var uuid = invIO.get("uuid");
	// dorado.MessageBox.alert(invIOId);

	var dsInvIODetail = view.id("dsInvIODetail");
	dsInvIODetail.clear();
	dsInvIODetail.set("parameter", {
		"invIOUid" : uuid
	});
	dsInvIODetail.flush();
}
